Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ATL ActiveX Control Event not firing in IE?

36 views
Skip to first unread message

Mark

unread,
Aug 2, 2001, 9:48:00 AM8/2/01
to
I have an ActiveX ATL "Lite Composite Control" developed in MSVC with SP6.
It has a "Change" event which works correctly when the control is used on a
Visual Basic form. It even works when I create the object dynamically in VB
using a "VBControlExtender". However, it does not seem to "fire" when the
control is used in IE (<OBJECT>). Similar events for other ActiveX controls
(i.e. listview) work correctly.

Any ideas what might not be working?

Thanks!!
Mark


Chetan N Parmar

unread,
Aug 2, 2001, 4:54:04 PM8/2/01
to
HI MArk,
An ActiveX control must implement the IProvideClassInfo or
IProvideClassInfo2 interface to enable event handling on a Web page. IE
uses this interface to obtain the type library for the control and
determine the available event set. When using theATL, the following 'lite
control' ATL objects do not implement the IProvideClassInfo2 interface by
default:

- Simple Object

- Internet Explorer Object

- Lite Control

- Lite Composite Control

- Lite HTML Control

You can easily add support for event handling by implementing the
IProvideClassInfo interfaces. This is done by deriving your control from the
default ATL implementation, IProvideClassInfo2Impl.
1. Add the following line to your class derivation list:

public IProvideClassInfo2Impl<&CLSID_<object_name>, NULL,
&LIBID_<project_name>Lib>

2. Add the following lines to your COM_MAP:

COM_INTERFACE_ENTRY(IProvideClassInfo)
COM_INTERFACE_ENTRY(IProvideClassInfo2)

Hope that helps. For additional information you can take a look at KB
Q200839

Regards
Chetan N Parmar
Microsoft

Mark

unread,
Aug 2, 2001, 6:21:57 PM8/2/01
to
EXCELLENT!!

Thanks for the help...easy fix!

Mark

"Chetan N Parmar" <parmar-...@msft.com> wrote in message
news:SyL1rV5...@cppssbbsa01.microsoft.com...

0 new messages